ICeTEe is a system extension that uses Internet Config technology in an imaginative way. ICeTEe does patches the MacOS’s built in text editing code, TextEdit, so that it supports command clicking of URLs. This means that you can command click URLs in any application that uses TextEdit to edit text. This includes such common programs as Eudora and SimpleText.
Installation and Use
Drop ICeTEe into your Extensions folder and reboot. You should now be able command click URLs in all TextEdit applications. For example, launch SimpleText and type in the following URL:
ftp://ftp.support.apple.com/
Now hold the command key and click anywhere in the URL. After a brief delay ICeTEe will flash the full URL and then launch your FTP helper application (as defined in Internet Config’s Helpers window) to open a connection to ftp.support.apple.com.
Troubleshooting
When you command click a URL and it fails to process it successfully, ICeTEe will display one of the following messages.
You need the Component Manager to use ICeTEe. Component Manager is included in System 7.1 or greater and is available as part of QuickTime or Speech Manager. Upgrade your system software or install one of the mentioned extensions.
The Internet Config extension is not installed. You must have the Internet Config Extension installed to use ICeTEe. You can install the extension by running the Internet Config application. There is a good reason for this requirement, so just install it and relax.
You need to upgrade to Internet Config extension 1.1 in order to use ICeTEe. ICeTEe requires the Internet Config Extension version 1.1 or greater. You can upgrade your version of the extension by running a copy of Internet Config application version 1.1 or greater.
Not enough memory to launch the helper application. There is not enough memory available to run the helper program associated with this URL. Quit some applications and try again.
Could not find the helper application. ICeTEe could not find the helper program associated with the URL. This is either because you don’t have a copy of the application or because your desktop database needs a rebuild. You should check that you have the right helper associated with the URL type in Internet Config’s Helpers window. If that is correct, you should rebuild your desktop database, by rebooting while holding down the command and option keys.
Could not find a helper for that URL. ICeTEe could not find a helper associated with that type of URL. Run Internet Config and add the appropriate helper in the Helpers window.
That isn’t a URL (well not by ICeTEe’s definition anyway). The thing you command clicked on is not a URL. ICeTEe selects the text it was trying to interpret as a URL. You might find that there are problems with line breaks or other strange characters being included in the URL. If you want to force ICeTEe to interpret a particular piece of text as a URL, select that text first and then command click on the text.
This application just can’t hack sending AppleEvents. The application that contains the URL is not AppleEvent aware and hence cannot support command-clicking.
Failed with a unexpected error (errnum). ICeTEe failed with an unexpected error. If you report this error, make sure to include the error number given in the message.
Caveats
ICeTEe will only work on programs that use TextEdit for their editing. Many simple applications using TextEdit but most of the complicated ones use their own text editing engines. You can test whether an application uses TextEdit by simply command clicking somewhere in the text. It it does nothing, chances are the application does not use TextEdit.
ICeTEe does bad things if the application already supports command clicking itself. ICeTEe contains a resource ('EXCL' ID=128) that you can edit to exclude applications. By default this list contains NewsWatcher’s creator code, because NewsWatcher already supports command clicking.
ICeTEe is still a bit of a hack and hence it is officially designated as “beta” software.
Hackery
If you empty out a string in the STR# 128 resource inside ICeTEe, it won’t put up the corresponding error message dialog. For example, you can blank out string number 8 and you will never see the “That isn’t a URL” error ever again (-;
How It Works
ICeTEe works by patching the MacOS routine _TEClick. First it samples the original selStart and selEnd out of the TERecord and then it calls through to the original _TEClick to process the click. If the command key is down it then process the old and new selections to determine where to look for a URL. Once it has determined the initial location, it calls Internet Config to process the URL.
ICeTEe relies on the IC routine ICLaunchURL, which is only avaliable under IC 1.1. The reason why IC requires the IC extension is to keep it small. The link-in implementation that you need if the component is missing would more that double ICeTEe’s memory footprint.
Programming Notes
ICeTEe’s source code is included in the IC Programmer’s Kit. One important thing to note is the ICeTEe registers a Gestalt selector 'ICTE'. The response from this selector is the address of a record with the following documented fields:
type
icteGlobals = record
signature: OSType;
version: NumVersion;
exclusionList: ExclusionArrayHandle;
(* other fields are private *)
end;
The signature field contains ICeTEe’s creator code, which you can check if you wish.
The version field contains the version of ICeTEe that is running, in the standard format.
The exclusionList handle contains the list of excluded creator code. You can modify the contents of the exclusions handle if you wish. If you want the changes to survive across reboots, you should also modify the resource in the ICeTEe extensions file.
Do not use or rely on any fields beyond the exclusions handle; they are reserved for future expansion.
Credits
ICeTEe was originally conceived by us late one weeknight. It was so cool that we had to implement it as soon as possible. We started the code at 23:00 and had finished by 1:30. This made for a very ugly workday the next day, but it was such a cool hack. We released that version of ICeTEe to the net, despite its obvious flaws. Since then, I (Quinn) have rewritten almost all of ICeTE, and it has been awaiting the release of Internet Config 1.1 for a proper release. ICeTEe 1.1.1 fixes a minor bug that caused ICeTEe not to work on some machines. Version 1.1.2 gives better error messages and deals with slack mail URLs. Version 1.2b4 was the result of switching from Think Pascal to Metrowerks Pascal to build ICeTEe.